/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * FormMain.java
 *
 * Created on Jan 30, 2011, 12:46:16 PM
 */

package juwita;

import com.jtattoo.plaf.acryl.AcrylLookAndFeel;
import com.jtattoo.plaf.hifi.HiFiLookAndFeel;
import com.jtattoo.plaf.luna.LunaLookAndFeel;
import com.jtattoo.plaf.mcwin.McWinLookAndFeel;
import javax.swing.ImageIcon;
import javax.swing.JDialog;
import javax.swing.JFrame;
import javax.swing.JOptionPane;
import javax.swing.SwingUtilities;
import javax.swing.UIManager;

/**
 *
 * @author Abah
 */
public class FormMain extends javax.swing.JFrame {

    static boolean isfBrg = false;
    static boolean isfBrgGol = false;
    static boolean isfBrgJenis = false;
    static boolean isfBrgProduk = false;
    static boolean isfPeg = false;
    static boolean isfPel = false;
    static boolean isftPen = false;
    static boolean isftPem = false;
    static boolean isfrPen = false;
    static boolean isfrPem = false;
    static boolean isfPiu = false;
    static boolean isfDBrg = false;
    static boolean isfDPel = false;
    static boolean isfBon = false;
    static boolean isfLPen = false;
    static boolean isfLPem = false;
    static boolean isfLBrg = false;
    static boolean isfLPeg = false;
    static boolean isfLPel = false;
    static boolean isfLLab = false;
    static boolean isfSup = false;
    static boolean isMenuEnabled = false;
    static String userName = "";
    
    /** Creates new form FormMain */
    public FormMain() {
        initComponents();
        //set max
        //this.setExtendedState(this.getExtendedState()|JFrame.MAXIMIZED_BOTH);
        //set icon
        this.setIconImage(new ImageIcon(getClass().getResource("/resource/3D.png")).getImage());
        disableMenu();
        
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        desktopPane = new javax.swing.JDesktopPane();
        toolBar = new javax.swing.JToolBar();
        btnBarang = new javax.swing.JButton();
        jSeparator1 = new javax.swing.JToolBar.Separator();
        btnPegawai = new javax.swing.JButton();
        btnPelanggan = new javax.swing.JButton();
        btnSupplier = new javax.swing.JButton();
        jSeparator2 = new javax.swing.JToolBar.Separator();
        btnPenjualan = new javax.swing.JButton();
        btnPembelian = new javax.swing.JButton();
        btnReturPenjualan = new javax.swing.JButton();
        btnReturPembelian = new javax.swing.JButton();
        btnPiutang = new javax.swing.JButton();
        jSeparator3 = new javax.swing.JToolBar.Separator();
        btnBonus = new javax.swing.JButton();
        jSeparator4 = new javax.swing.JToolBar.Separator();
        btnLaba = new javax.swing.JButton();
        menuBar = new javax.swing.JMenuBar();
        mnUser = new javax.swing.JMenu();
        mnLogin = new javax.swing.JMenuItem();
        mnLogout = new javax.swing.JMenuItem();
        mnExit = new javax.swing.JMenuItem();
        mnMaster = new javax.swing.JMenu();
        mnMenuBarang = new javax.swing.JMenu();
        mnGolBarang = new javax.swing.JMenuItem();
        mnJenisBarang = new javax.swing.JMenuItem();
        mnProdukBarang = new javax.swing.JMenuItem();
        mnBarang = new javax.swing.JMenuItem();
        mnPegawai = new javax.swing.JMenuItem();
        mnPelanggan = new javax.swing.JMenuItem();
        mnSupplier = new javax.swing.JMenuItem();
        mnTransaksi = new javax.swing.JMenu();
        mnPenjualan = new javax.swing.JMenuItem();
        mnPembelian = new javax.swing.JMenuItem();
        mnReturPenjualan = new javax.swing.JMenuItem();
        mnReturPembelian = new javax.swing.JMenuItem();
        mnPiutang = new javax.swing.JMenuItem();
        mnSettings = new javax.swing.JMenu();
        mnDiscount = new javax.swing.JMenu();
        mnDiscountBarang = new javax.swing.JMenuItem();
        mnDiscountPelanggan = new javax.swing.JMenuItem();
        mnBonus = new javax.swing.JMenuItem();
        mnLaporan = new javax.swing.JMenu();
        mnLapPenjualan = new javax.swing.JMenuItem();
        mnLapPembelian = new javax.swing.JMenuItem();
        mnLapBarang = new javax.swing.JMenuItem();
        mnLapPegawai = new javax.swing.JMenuItem();
        mnLapPelanggan = new javax.swing.JMenuItem();
        mnLapLabaRugi = new javax.swing.JMenuItem();
        mnHelp = new javax.swing.JMenu();
        mnContents = new javax.swing.JMenuItem();
        mnAbout = new javax.swing.JMenuItem();

        setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);
        setTitle("CV Juwita Makmur");
        addWindowListener(new java.awt.event.WindowAdapter() {
            public void windowActivated(java.awt.event.WindowEvent evt) {
                formWindowActivated(evt);
            }
            public void windowClosing(java.awt.event.WindowEvent evt) {
                formWindowClosing(evt);
            }
            public void windowOpened(java.awt.event.WindowEvent evt) {
                formWindowOpened(evt);
            }
        });
        addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusGained(java.awt.event.FocusEvent evt) {
                formFocusGained(evt);
            }
        });

        desktopPane.setBackground(new java.awt.Color(255, 255, 255));
        getContentPane().add(desktopPane, java.awt.BorderLayout.CENTER);

        toolBar.setFloatable(false);
        toolBar.setRollover(true);
        toolBar.setPreferredSize(new java.awt.Dimension(50, 50));

        btnBarang.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        btnBarang.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resource/barang.png"))); // NOI18N
        btnBarang.setText("Barang");
        btnBarang.setToolTipText("Master Data Barang");
        btnBarang.setFocusable(false);
        btnBarang.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnBarang.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        btnBarang.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnBarangActionPerformed(evt);
            }
        });
        toolBar.add(btnBarang);
        toolBar.add(jSeparator1);

        btnPegawai.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        btnPegawai.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resource/pegawai.png"))); // NOI18N
        btnPegawai.setText("Pegawai");
        btnPegawai.setToolTipText("Data Pegawai");
        btnPegawai.setFocusable(false);
        btnPegawai.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnPegawai.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        btnPegawai.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnPegawaiActionPerformed(evt);
            }
        });
        toolBar.add(btnPegawai);

        btnPelanggan.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        btnPelanggan.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resource/pelanggan.png"))); // NOI18N
        btnPelanggan.setText("Pelanggan");
        btnPelanggan.setToolTipText("Data Pelanggan");
        btnPelanggan.setFocusable(false);
        btnPelanggan.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnPelanggan.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        btnPelanggan.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnPelangganActionPerformed(evt);
            }
        });
        toolBar.add(btnPelanggan);

        btnSupplier.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        btnSupplier.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resource/mnSupplier.png"))); // NOI18N
        btnSupplier.setText("Supplier");
        btnSupplier.setToolTipText("Data Supplier (Pemasok)");
        btnSupplier.setFocusable(false);
        btnSupplier.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnSupplier.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        btnSupplier.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnSupplierActionPerformed(evt);
            }
        });
        toolBar.add(btnSupplier);
        toolBar.add(jSeparator2);

        btnPenjualan.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        btnPenjualan.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resource/penjualan.png"))); // NOI18N
        btnPenjualan.setText("Penjualan");
        btnPenjualan.setToolTipText("Transaksi Penjualan");
        btnPenjualan.setFocusable(false);
        btnPenjualan.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnPenjualan.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        btnPenjualan.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnPenjualanActionPerformed(evt);
            }
        });
        toolBar.add(btnPenjualan);

        btnPembelian.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        btnPembelian.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resource/pembelian.png"))); // NOI18N
        btnPembelian.setText("Pembelian");
        btnPembelian.setToolTipText("Transaksi Pembelian");
        btnPembelian.setFocusable(false);
        btnPembelian.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnPembelian.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        btnPembelian.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnPembelianActionPerformed(evt);
            }
        });
        toolBar.add(btnPembelian);

        btnReturPenjualan.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        btnReturPenjualan.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resource/returjual.png"))); // NOI18N
        btnReturPenjualan.setText("Retur Jual");
        btnReturPenjualan.setToolTipText("Retur Jual");
        btnReturPenjualan.setFocusable(false);
        btnReturPenjualan.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnReturPenjualan.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        btnReturPenjualan.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnReturPenjualanActionPerformed(evt);
            }
        });
        toolBar.add(btnReturPenjualan);

        btnReturPembelian.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        btnReturPembelian.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resource/returbeli.png"))); // NOI18N
        btnReturPembelian.setText("Retur Beli");
        btnReturPembelian.setToolTipText("Retur Beli");
        btnReturPembelian.setFocusable(false);
        btnReturPembelian.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnReturPembelian.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        btnReturPembelian.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnReturPembelianActionPerformed(evt);
            }
        });
        toolBar.add(btnReturPembelian);

        btnPiutang.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        btnPiutang.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resource/piutang.png"))); // NOI18N
        btnPiutang.setText("Piutang");
        btnPiutang.setToolTipText("Piutang (Tagihan)");
        btnPiutang.setFocusable(false);
        btnPiutang.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnPiutang.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        btnPiutang.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnPiutangActionPerformed(evt);
            }
        });
        toolBar.add(btnPiutang);
        toolBar.add(jSeparator3);

        btnBonus.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        btnBonus.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resource/bonus.png"))); // NOI18N
        btnBonus.setText("Bonus");
        btnBonus.setToolTipText("Bonus");
        btnBonus.setFocusable(false);
        btnBonus.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnBonus.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        btnBonus.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnBonusActionPerformed(evt);
            }
        });
        toolBar.add(btnBonus);
        toolBar.add(jSeparator4);

        btnLaba.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        btnLaba.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resource/23.png"))); // NOI18N
        btnLaba.setText("Laba / Rugi");
        btnLaba.setToolTipText("Laba / Rugi");
        btnLaba.setFocusable(false);
        btnLaba.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnLaba.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        btnLaba.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnLabaActionPerformed(evt);
            }
        });
        toolBar.add(btnLaba);

        getContentPane().add(toolBar, java.awt.BorderLayout.PAGE_START);

        mnUser.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resource/mnUser.png"))); // NOI18N
        mnUser.setMnemonic('U');
        mnUser.setText("User");

        mnLogin.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resource/login.png"))); // NOI18N
        mnLogin.setMnemonic('I');
        mnLogin.setText("Login");
        mnLogin.setEnabled(false);
        mnLogin.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnLoginActionPerformed(evt);
            }
        });
        mnUser.add(mnLogin);

        mnLogout.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resource/logout.png"))); // NOI18N
        mnLogout.setMnemonic('O');
        mnLogout.setText("Logout");
        mnLogout.setEnabled(false);
        mnLogout.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnLogoutActionPerformed(evt);
            }
        });
        mnUser.add(mnLogout);

        mnExit.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resource/exitk.png"))); // NOI18N
        mnExit.setMnemonic('e');
        mnExit.setText("Exit");
        mnExit.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnExitActionPerformed(evt);
            }
        });
        mnUser.add(mnExit);

        menuBar.add(mnUser);

        mnMaster.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resource/master.png"))); // NOI18N
        mnMaster.setMnemonic('M');
        mnMaster.setText("Master");

        mnMenuBarang.setText("Barang");

        mnGolBarang.setText("Golongan Barang");
        mnGolBarang.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnGolBarangActionPerformed(evt);
            }
        });
        mnMenuBarang.add(mnGolBarang);

        mnJenisBarang.setText("Jenis Barang");
        mnJenisBarang.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnJenisBarangActionPerformed(evt);
            }
        });
        mnMenuBarang.add(mnJenisBarang);

        mnProdukBarang.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resource/mnProduk.png"))); // NOI18N
        mnProdukBarang.setText("Produk Barang");
        mnProdukBarang.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnProdukBarangActionPerformed(evt);
            }
        });
        mnMenuBarang.add(mnProdukBarang);

        mnBarang.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resource/barang.png"))); // NOI18N
        mnBarang.setMnemonic('b');
        mnBarang.setText("Barang");
        mnBarang.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnBarangActionPerformed(evt);
            }
        });
        mnMenuBarang.add(mnBarang);

        mnMaster.add(mnMenuBarang);

        mnPegawai.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resource/pegawai.png"))); // NOI18N
        mnPegawai.setMnemonic('p');
        mnPegawai.setText("Pegawai");
        mnPegawai.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnPegawaiActionPerformed(evt);
            }
        });
        mnMaster.add(mnPegawai);

        mnPelanggan.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resource/pelanggan.png"))); // NOI18N
        mnPelanggan.setMnemonic('e');
        mnPelanggan.setText("Pelanggan");
        mnPelanggan.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnPelangganActionPerformed(evt);
            }
        });
        mnMaster.add(mnPelanggan);

        mnSupplier.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resource/mnSupplier.png"))); // NOI18N
        mnSupplier.setText("Supplier (Pemasok)");
        mnSupplier.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnSupplierActionPerformed(evt);
            }
        });
        mnMaster.add(mnSupplier);

        menuBar.add(mnMaster);

        mnTransaksi.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resource/mnTransaksi.png"))); // NOI18N
        mnTransaksi.setMnemonic('T');
        mnTransaksi.setText("Transaksi");

        mnPenjualan.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resource/penjualan.png"))); // NOI18N
        mnPenjualan.setMnemonic('j');
        mnPenjualan.setText("Penjualan");
        mnPenjualan.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnPenjualanActionPerformed(evt);
            }
        });
        mnTransaksi.add(mnPenjualan);

        mnPembelian.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resource/pembelian.png"))); // NOI18N
        mnPembelian.setMnemonic('b');
        mnPembelian.setText("Pembelian");
        mnPembelian.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnPembelianActionPerformed(evt);
            }
        });
        mnTransaksi.add(mnPembelian);

        mnReturPenjualan.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resource/returjual.png"))); // NOI18N
        mnReturPenjualan.setMnemonic('r');
        mnReturPenjualan.setText("Retur Penjualan");
        mnReturPenjualan.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnReturPenjualanActionPerformed(evt);
            }
        });
        mnTransaksi.add(mnReturPenjualan);

        mnReturPembelian.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resource/returbeli.png"))); // NOI18N
        mnReturPembelian.setMnemonic('e');
        mnReturPembelian.setText("Retur Pembelian");
        mnReturPembelian.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnReturPembelianActionPerformed(evt);
            }
        });
        mnTransaksi.add(mnReturPembelian);

        mnPiutang.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resource/piutang.png"))); // NOI18N
        mnPiutang.setMnemonic('u');
        mnPiutang.setText("Piutang (Tagihan)");
        mnPiutang.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnPiutangActionPerformed(evt);
            }
        });
        mnTransaksi.add(mnPiutang);

        menuBar.add(mnTransaksi);

        mnSettings.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resource/mn_setting.png"))); // NOI18N
        mnSettings.setMnemonic('S');
        mnSettings.setText("Settings");
        mnSettings.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnSettingsActionPerformed(evt);
            }
        });

        mnDiscount.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resource/discount.png"))); // NOI18N
        mnDiscount.setMnemonic('d');
        mnDiscount.setText("Discount");

        mnDiscountBarang.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resource/disc_brg.png"))); // NOI18N
        mnDiscountBarang.setMnemonic('b');
        mnDiscountBarang.setText("Barang");
        mnDiscountBarang.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnDiscountBarangActionPerformed(evt);
            }
        });
        mnDiscount.add(mnDiscountBarang);

        mnDiscountPelanggan.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resource/disc_pel.PNG"))); // NOI18N
        mnDiscountPelanggan.setMnemonic('p');
        mnDiscountPelanggan.setText("Pelanggan");
        mnDiscountPelanggan.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnDiscountPelangganActionPerformed(evt);
            }
        });
        mnDiscount.add(mnDiscountPelanggan);

        mnSettings.add(mnDiscount);

        mnBonus.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resource/bonus.png"))); // NOI18N
        mnBonus.setMnemonic('b');
        mnBonus.setText("Bonus / Insentif");
        mnBonus.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnBonusActionPerformed(evt);
            }
        });
        mnSettings.add(mnBonus);

        menuBar.add(mnSettings);

        mnLaporan.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resource/mnLap.png"))); // NOI18N
        mnLaporan.setMnemonic('L');
        mnLaporan.setText("Laporan");

        mnLapPenjualan.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resource/lap_jual.png"))); // NOI18N
        mnLapPenjualan.setMnemonic('j');
        mnLapPenjualan.setText("Penjualan");
        mnLapPenjualan.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnLapPenjualanActionPerformed(evt);
            }
        });
        mnLaporan.add(mnLapPenjualan);

        mnLapPembelian.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resource/lap_beli.png"))); // NOI18N
        mnLapPembelian.setMnemonic('b');
        mnLapPembelian.setText("Pembelian");
        mnLapPembelian.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnLapPembelianActionPerformed(evt);
            }
        });
        mnLaporan.add(mnLapPembelian);

        mnLapBarang.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resource/lap_brg.png"))); // NOI18N
        mnLapBarang.setMnemonic('a');
        mnLapBarang.setText("Barang");
        mnLapBarang.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnLapBarangActionPerformed(evt);
            }
        });
        mnLaporan.add(mnLapBarang);

        mnLapPegawai.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resource/lap_peg.png"))); // NOI18N
        mnLapPegawai.setMnemonic('p');
        mnLapPegawai.setText("Pegawai");
        mnLapPegawai.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnLapPegawaiActionPerformed(evt);
            }
        });
        mnLaporan.add(mnLapPegawai);

        mnLapPelanggan.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resource/lap_pel.png"))); // NOI18N
        mnLapPelanggan.setMnemonic('e');
        mnLapPelanggan.setText("Pelanggan");
        mnLapPelanggan.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnLapPelangganActionPerformed(evt);
            }
        });
        mnLaporan.add(mnLapPelanggan);

        mnLapLabaRugi.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resource/23.png"))); // NOI18N
        mnLapLabaRugi.setMnemonic('r');
        mnLapLabaRugi.setText("Laba / Rugi");
        mnLapLabaRugi.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnLapLabaRugiActionPerformed(evt);
            }
        });
        mnLaporan.add(mnLapLabaRugi);

        menuBar.add(mnLaporan);

        mnHelp.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resource/mnHelp.png"))); // NOI18N
        mnHelp.setMnemonic('H');
        mnHelp.setText("Help");

        mnContents.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resource/help2.png"))); // NOI18N
        mnContents.setMnemonic('c');
        mnContents.setText("Contents");
        mnHelp.add(mnContents);

        mnAbout.setText("About");
        mnAbout.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnAboutActionPerformed(evt);
            }
        });
        mnHelp.add(mnAbout);

        menuBar.add(mnHelp);

        setJMenuBar(menuBar);

        java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
        setBounds((screenSize.width-800)/2, (screenSize.height-600)/2, 800, 600);
    }// </editor-fold>//GEN-END:initComponents

    private void mnExitActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnExitActionPerformed
        //System.exit(0);
        int clossing;
        clossing = JOptionPane.showConfirmDialog(this,
                "Apakah Anda yakin akan keluar dari aplikasi ini?",
                "Konfirmasi",
                JOptionPane.YES_NO_OPTION);
        if (clossing == 0){
            this.dispose();
        }
    }//GEN-LAST:event_mnExitActionPerformed

    private void formWindowClosing(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowClosing
        // TODO add your handling code here:
        int clossing;
        clossing = JOptionPane.showConfirmDialog(this,
                "Apakah Anda yakin akan keluar dari aplikasi ini?",
                "Konfirmasi",
                JOptionPane.YES_NO_OPTION);
        if (clossing == 0){
            this.dispose();
        }
    }//GEN-LAST:event_formWindowClosing

    private void mnBarangActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnBarangActionPerformed
        frmBarangShow();
    }//GEN-LAST:event_mnBarangActionPerformed

    private void mnPegawaiActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnPegawaiActionPerformed
        // TODO add your handling code here:
        frmPegawaiShow();
}//GEN-LAST:event_mnPegawaiActionPerformed

    private void mnPelangganActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnPelangganActionPerformed
        // TODO add your handling code here:
        frmPelangganShow();
}//GEN-LAST:event_mnPelangganActionPerformed

    private void formWindowOpened(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowOpened
        // TODO add your handling code here:

        DlgLogin dl = new DlgLogin(this, true);
        dl.setLocationRelativeTo(this);
        dl.setVisible(true);
        setEnDisMenu();
        
    }//GEN-LAST:event_formWindowOpened

    private void formWindowActivated(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowActivated
        // TODO add your handling code here:
        
        if (!userName.equals("")){
            this.setTitle("Login : " 
                    + userName + " - CV Juwita Makmur");
        }
        setEnDisMenu();
        
    }//GEN-LAST:event_formWindowActivated

    private void mnLogoutActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnLogoutActionPerformed
        // TODO add your handling code here:
        int clossing;
        clossing = JOptionPane.showConfirmDialog(this,
                "Apakah Anda yakin akan Logout?",
                "Konfirmasi",
                JOptionPane.YES_NO_OPTION);
        if (clossing == 0){
            isMenuEnabled = false;
            userName = "";
            this.setTitle("CV Juwita Makmur");
        }
        //System.out.println("isMenuEnabled = " + isMenuEnabled);

        /*
        JDialog.setDefaultLookAndFeelDecorated(true);
        int respone = JOptionPane.showConfirmDialog(null, "you?",
                "confirm", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);
        if(respone == JOptionPane.NO_OPTION){
            System.out.println("No button");
        } else if (respone == JOptionPane.YES_OPTION){
            //mnMaster.disable();
            mnMaster.setEnabled(false);
            System.out.println("yes button");
            //disableMenu();
        } else if (respone == JOptionPane.CLOSED_OPTION){
            System.out.println("closed");
        }
         * 
         */
    }//GEN-LAST:event_mnLogoutActionPerformed

    //private void
    private void mnLoginActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnLoginActionPerformed
        // TODO add your handling code here:
        DlgLogin dl = new DlgLogin(this, true);
        dl.setLocationRelativeTo(this);
        dl.setVisible(true);
        //disableMenu();
    }//GEN-LAST:event_mnLoginActionPerformed

    private void mnAboutActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnAboutActionPerformed
        // TODO add your handling code here:
        // TODO add your handling code here:
        DlgAbout da = new DlgAbout(this, true);
        //da.setAlwaysOnTop(true);
        da.setLocationRelativeTo(this);
        da.setVisible(true);
    }//GEN-LAST:event_mnAboutActionPerformed

    private void formFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_formFocusGained
        // TODO add your handling code here:
        //JOptionPane.showMessageDialog(this, "muncul!!","naon weh",JOptionPane.INFORMATION_MESSAGE);
    }//GEN-LAST:event_formFocusGained

    private void mnPenjualanActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnPenjualanActionPerformed
        // TODO add your handling code here:
        frmPenjualanShow();
    }//GEN-LAST:event_mnPenjualanActionPerformed

    private void mnPembelianActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnPembelianActionPerformed
        // TODO add your handling code here:
        frmPembelianShow();
    }//GEN-LAST:event_mnPembelianActionPerformed

    private void mnReturPenjualanActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnReturPenjualanActionPerformed
        // TODO add your handling code here:
        frmReturJualShow();
    }//GEN-LAST:event_mnReturPenjualanActionPerformed

    private void mnReturPembelianActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnReturPembelianActionPerformed
        // TODO add your handling code here:
        frmReturBeliShow();
    }//GEN-LAST:event_mnReturPembelianActionPerformed

    private void mnPiutangActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnPiutangActionPerformed
        // TODO add your handling code here:
        frmPiutangShow();
    }//GEN-LAST:event_mnPiutangActionPerformed

    private void mnDiscountBarangActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnDiscountBarangActionPerformed
        // TODO add your handling code here:
        if(isfDBrg==false){
            FormDBarang f = new FormDBarang();
            desktopPane.add(f);
            f.setVisible(true);
            isfDBrg = true;
        } 
    }//GEN-LAST:event_mnDiscountBarangActionPerformed

    private void mnDiscountPelangganActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnDiscountPelangganActionPerformed
        // TODO add your handling code here:
        if(isfDPel==false){
            FormDPelanggan f = new FormDPelanggan();
            desktopPane.add(f);
            f.setVisible(true);
            isfDPel = true;
        }
    }//GEN-LAST:event_mnDiscountPelangganActionPerformed

    private void mnBonusActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnBonusActionPerformed
        // TODO add your handling code here:
        frmBonusShow();
    }//GEN-LAST:event_mnBonusActionPerformed

    private void mnLapPenjualanActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnLapPenjualanActionPerformed
        // TODO add your handling code here:
        if(isfLPen==false){
            FormLPenjualan f = new FormLPenjualan();
            desktopPane.add(f);
            f.setVisible(true);
            isfLPen = true;
        }
    }//GEN-LAST:event_mnLapPenjualanActionPerformed

    private void mnLapPembelianActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnLapPembelianActionPerformed
        // TODO add your handling code here:
        if(isfLPem==false){
            FormLPembelian f = new FormLPembelian();
            desktopPane.add(f);
            f.setVisible(true);
            isfLPem = true;
        }
    }//GEN-LAST:event_mnLapPembelianActionPerformed

    private void mnLapBarangActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnLapBarangActionPerformed
        // TODO add your handling code here:
        if(isfLBrg==false){
            FormLBarang f = new FormLBarang();
            desktopPane.add(f);
            f.setVisible(true);
            isfLBrg = true;
        }
    }//GEN-LAST:event_mnLapBarangActionPerformed

    private void mnLapPegawaiActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnLapPegawaiActionPerformed
        // TODO add your handling code here:
        if(isfLPeg==false){
            FormLPegawai f = new FormLPegawai();
            desktopPane.add(f);
            f.setVisible(true);
            isfLPeg = true;
        }
    }//GEN-LAST:event_mnLapPegawaiActionPerformed

    private void mnLapPelangganActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnLapPelangganActionPerformed
        // TODO add your handling code here:
        if(isfLPel==false){
            FormLPelanggan f = new FormLPelanggan();
            desktopPane.add(f);
            f.setVisible(true);
            isfLPel = true;
        }
    }//GEN-LAST:event_mnLapPelangganActionPerformed

    private void mnLapLabaRugiActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnLapLabaRugiActionPerformed
        // TODO add your handling code here:
        frmLabaRugiShow();
    }//GEN-LAST:event_mnLapLabaRugiActionPerformed

    private void mnGolBarangActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnGolBarangActionPerformed
        // TODO add your handling code here:
        if(isfBrgGol==false){
            FormBarangGol f = new FormBarangGol();
            desktopPane.add(f);
            f.setVisible(true);
            isfBrgGol = true;
        }
    }//GEN-LAST:event_mnGolBarangActionPerformed

    private void mnJenisBarangActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnJenisBarangActionPerformed
        // TODO add your handling code here:
        if(isfBrgJenis==false){
            FormBarangJenis f = new FormBarangJenis();
            desktopPane.add(f);
            f.setVisible(true);
            isfBrgJenis = true;
        }
    }//GEN-LAST:event_mnJenisBarangActionPerformed

    private void mnProdukBarangActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnProdukBarangActionPerformed
        // TODO add your handling code here:
        if(isfBrgProduk==false){
            FormBarangProduk f = new FormBarangProduk();
            desktopPane.add(f);
            f.setVisible(true);
            isfBrgProduk = true;
        }
    }//GEN-LAST:event_mnProdukBarangActionPerformed

    private void mnSupplierActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnSupplierActionPerformed
        // TODO add your handling code here:
        frmSupplierShow();
    }//GEN-LAST:event_mnSupplierActionPerformed

    private void btnPegawaiActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnPegawaiActionPerformed
        // TODO add your handling code here:
        frmPegawaiShow();
    }//GEN-LAST:event_btnPegawaiActionPerformed

    private void btnBarangActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnBarangActionPerformed
        // TODO add your handling code here:
        frmBarangShow();
    }//GEN-LAST:event_btnBarangActionPerformed

    private void btnPelangganActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnPelangganActionPerformed
        // TODO add your handling code here:
        frmPelangganShow();
    }//GEN-LAST:event_btnPelangganActionPerformed

    private void btnSupplierActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSupplierActionPerformed
        // TODO add your handling code here:
        frmSupplierShow();
    }//GEN-LAST:event_btnSupplierActionPerformed

    private void btnPenjualanActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnPenjualanActionPerformed
        // TODO add your handling code here:
        frmPenjualanShow();
    }//GEN-LAST:event_btnPenjualanActionPerformed

    private void btnPembelianActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnPembelianActionPerformed
        // TODO add your handling code here:
        frmPembelianShow();
    }//GEN-LAST:event_btnPembelianActionPerformed

    private void btnReturPenjualanActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnReturPenjualanActionPerformed
        // TODO add your handling code here:
        frmReturJualShow();
    }//GEN-LAST:event_btnReturPenjualanActionPerformed

    private void btnReturPembelianActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnReturPembelianActionPerformed
        // TODO add your handling code here:
        frmReturBeliShow();
    }//GEN-LAST:event_btnReturPembelianActionPerformed

    private void btnPiutangActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnPiutangActionPerformed
        // TODO add your handling code here:
        frmPiutangShow();
    }//GEN-LAST:event_btnPiutangActionPerformed

    private void mnSettingsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnSettingsActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_mnSettingsActionPerformed

    private void btnBonusActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnBonusActionPerformed
        // TODO add your handling code here:
        frmBonusShow();
    }//GEN-LAST:event_btnBonusActionPerformed

    private void btnLabaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnLabaActionPerformed
        // TODO add your handling code here:
        frmLabaRugiShow();
    }//GEN-LAST:event_btnLabaActionPerformed

    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) {

        try {
            JFrame.setDefaultLookAndFeelDecorated(true);
            UIManager.setLookAndFeel(new McWinLookAndFeel());
        } catch (Exception ex){
            ex.printStackTrace();
        }
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new FormMain().setVisible(true);
            }
        });
    }

    private void disableMenu(){    
        mnLogout.setEnabled(false);
        mnLaporan.setEnabled(false);
        mnTransaksi.setEnabled(false);
        mnMaster.setEnabled(false);
        mnSettings.setEnabled(false);

        mnLogin.setEnabled(true);
    }

    private void enableMenu(){
        mnLogin.setEnabled(false);

        mnLogout.setEnabled(true);
        mnLaporan.setEnabled(true);
        mnTransaksi.setEnabled(true);
        mnMaster.setEnabled(true);
        mnSettings.setEnabled(true);
    }

    
    private void setEnDisMenu(){
        if (isMenuEnabled == false){
            disableMenu();
        }else{
            enableMenu();
        }
    }
     


    /*
    public void addFrame(JPanel panel, String title){
        try{
            JInternalFrame[] children = desktopPane.getAllFrames();
            //creating a new internal frame from the Panel passes as parameter
            FormBarang j = new FormBarang();
            
        }
    }
     * 
     */

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnBarang;
    private javax.swing.JButton btnBonus;
    private javax.swing.JButton btnLaba;
    private javax.swing.JButton btnPegawai;
    private javax.swing.JButton btnPelanggan;
    private javax.swing.JButton btnPembelian;
    private javax.swing.JButton btnPenjualan;
    private javax.swing.JButton btnPiutang;
    private javax.swing.JButton btnReturPembelian;
    private javax.swing.JButton btnReturPenjualan;
    private javax.swing.JButton btnSupplier;
    private javax.swing.JDesktopPane desktopPane;
    private javax.swing.JToolBar.Separator jSeparator1;
    private javax.swing.JToolBar.Separator jSeparator2;
    private javax.swing.JToolBar.Separator jSeparator3;
    private javax.swing.JToolBar.Separator jSeparator4;
    private javax.swing.JMenuBar menuBar;
    private javax.swing.JMenuItem mnAbout;
    private javax.swing.JMenuItem mnBarang;
    private javax.swing.JMenuItem mnBonus;
    private javax.swing.JMenuItem mnContents;
    private javax.swing.JMenu mnDiscount;
    private javax.swing.JMenuItem mnDiscountBarang;
    private javax.swing.JMenuItem mnDiscountPelanggan;
    private javax.swing.JMenuItem mnExit;
    private javax.swing.JMenuItem mnGolBarang;
    private javax.swing.JMenu mnHelp;
    private javax.swing.JMenuItem mnJenisBarang;
    private javax.swing.JMenuItem mnLapBarang;
    private javax.swing.JMenuItem mnLapLabaRugi;
    private javax.swing.JMenuItem mnLapPegawai;
    private javax.swing.JMenuItem mnLapPelanggan;
    private javax.swing.JMenuItem mnLapPembelian;
    private javax.swing.JMenuItem mnLapPenjualan;
    private javax.swing.JMenu mnLaporan;
    private javax.swing.JMenuItem mnLogin;
    private javax.swing.JMenuItem mnLogout;
    private javax.swing.JMenu mnMaster;
    private javax.swing.JMenu mnMenuBarang;
    private javax.swing.JMenuItem mnPegawai;
    private javax.swing.JMenuItem mnPelanggan;
    private javax.swing.JMenuItem mnPembelian;
    private javax.swing.JMenuItem mnPenjualan;
    private javax.swing.JMenuItem mnPiutang;
    private javax.swing.JMenuItem mnProdukBarang;
    private javax.swing.JMenuItem mnReturPembelian;
    private javax.swing.JMenuItem mnReturPenjualan;
    private javax.swing.JMenu mnSettings;
    private javax.swing.JMenuItem mnSupplier;
    private javax.swing.JMenu mnTransaksi;
    private javax.swing.JMenu mnUser;
    private javax.swing.JToolBar toolBar;
    // End of variables declaration//GEN-END:variables

    private void frmPegawaiShow(){
        if(isfPeg==false){
            FormPegawai fpeg = new FormPegawai();
            desktopPane.add(fpeg);
            fpeg.setVisible(true);
            isfPeg = true;
        }
    }

    private void frmBarangShow(){
        if(isfBrg==false){
            FormBarang fb = new FormBarang();
            desktopPane.add(fb);
            fb.setVisible(true);
            isfBrg = true;
        }
    }

    private void frmPelangganShow(){
        if(isfPel==false){
            FormPelanggan fpel = new FormPelanggan();
            desktopPane.add(fpel);
            fpel.setVisible(true);
            isfPel = true;
        }
    }

    private void frmSupplierShow(){
        if(isfSup==false){
            FormSupplier f = new FormSupplier();
            desktopPane.add(f);
            f.setVisible(true);
            isfSup = true;
        }
    }

    private void frmPenjualanShow(){
        if(isftPen==false){
            FormTPenjualan f = new FormTPenjualan();
            desktopPane.add(f);
            f.setVisible(true);
            isftPen = true;
        }
    }

    private void frmPembelianShow(){
        if(isftPem==false){
            FormTPembelian f = new FormTPembelian();
            desktopPane.add(f);
            f.setVisible(true);
            isftPem = true;
        }
    }

    private void frmReturJualShow(){
        if(isfrPen==false){
            FormRJual f = new FormRJual();
            desktopPane.add(f);
            f.setVisible(true);
            isfrPen = true;
        }
    }

    private void frmReturBeliShow(){
        if(isfrPem==false){
            FormRBeli f = new FormRBeli();
            desktopPane.add(f);
            f.setVisible(true);
            isfrPem = true;
        }
    }

    private void frmPiutangShow(){
        if(isfPiu==false){
            FormPiutang f = new FormPiutang();
            desktopPane.add(f);
            f.setVisible(true);
            isfPiu = true;
        }
    }

    private void frmBonusShow(){
        if(isfBon==false){
            FormBonus f = new FormBonus();
            desktopPane.add(f);
            f.setVisible(true);
            isfBon = true;
        }
    }

    private void frmLabaRugiShow(){
        if(isfLLab==false){
            FormLLabaRugi f = new FormLLabaRugi();
            desktopPane.add(f);
            f.setVisible(true);
            isfLLab = true;
        }
    }
}
